package com.co.notaweb.bussines.system;

import java.util.List;

import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.co.notaweb.entities.Persona;

/**
 * @author PC
 * @version 1.0
 * @created 13-nov-2011 12:14:24
 */
@Stateless
@TransactionAttribute(TransactionAttributeType.MANDATORY)
public class PersonaBussines implements IPersonaBussinesLocal {
	@PersistenceContext(unitName = "notaweb")
	private EntityManager em;
	
	public PersonaBussines() {

	}

	/**
	 * 
	 * @param 
	 */
	public List<Persona> consultarAllPersonas() {
		return em.createNamedQuery("Persona.allPersonas").getResultList();	
	}
	

}